﻿using Syspetro.Core.Extensions;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace Syspetro.Core.DbAccessor
{
    public interface IPageReq<T> : IOrderByReq  where T : IPrivateEntity
    {
        /// <summary>
        /// 页码
        /// </summary>
        int Current { get; set; }
        /// <summary>
        /// 每页数据条数
        /// </summary>
        int Size { get; set; }
        /// <summary>
        /// 条件关联关系
        /// </summary>
        string And_Or { get; set; }
        /// <summary>
        /// 查询条件
        /// </summary>
        List<LinqOption> WhereOptions { get; set; }
        /// <summary>
        /// 查找条件
        /// </summary>
        Expression<Func<T, bool>> GetWhereExpression();
    }
}
